Get multiple domains working again
authordjm@kirby.fc.hp.com <djm@kirby.fc.hp.com>
Tue, 20 Sep 2005 19:03:25 +0000 (13:03 -0600)
committerdjm@kirby.fc.hp.com <djm@kirby.fc.hp.com>
Tue, 20 Sep 2005 19:03:25 +0000 (13:03 -0600)
commit2c01d5bac9ec665b176622bd28517a78c8c38e19
tree7530eb86209b7520c90b0940067b0fde6472e228
parent286f47e0ac672c039328947caf9eaf1b236a5dbd
Get multiple domains working again
Signed-off-by Kevin Tian <kevin.tian@intel.com>

Some interesting issues found related to two small patches:
1. Only "xm console 1" and "Ctrl + ]" can make xenU forward progress,
and however still failed to connect blkback later.
[Reason] Previous event injection on XEN/IPF only set vIRR bit
when evtchn_set_pending. However with the latest xenlinux code, it's
possible for xenlinux to set pending indication and selector when
unmasking some pending event channel. This path has nothing to do with
vIRR bit.

[Solution] We should check event pending every time when
checking pending interrupts before returning to guest.

2. After fixing first issue, nested event is injected when first event
is still in handle with lock held. Then dead lock happens at end of
"xend start".
[Reason] Due to same logic as above, xenlinux may set pending
indication and re-trigger pending event by force_evtchn_callback. On
x86, this stub just does a dummy xen_version hypercall and pending event
will be injected back when leaving hypervisor. However on IA64,
force_evtchn_callback is incautiously made invoking evtchn_interrupt()
directly, while the former may be called with lock held.

[Solution] Just let force_evtchn_callback as empty for simple now.
xen/arch/ia64/xen/domain.c
xen/arch/ia64/xen/vcpu.c